<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp_lib/init.jsp"%>
<script type="text/javascript">
	var button = Ext.create("Ext.Button", {

		text : "控制面板",
		//iconCls: "menu-button",
		icon : jcapp.getIcon("application_side_list.png"),
		menu : {
			items : [ {
				text : '个人信息'
			}, {
				text : '密码修改',
				handler : function() {
					var title = "密码修改";
					var code = "pwdchange";
					var url = "/cp/user/admin/pwd.htm";
					
					openTab(title, code, url);
				}
			} ]
		}
	}).showMenu();

	var logoutButton = Ext.create("Ext.Button", {

		text : "退出系统",
		icon : jcapp.getIcon("application_side_expand.png"),
		//iconCls: "menu-button",
		handler : function() {
			Ext.Msg.confirm("提示:", "确认退出吗?", function(e) {
				if (e == "yes") {
					window.location.href = "${path}/logout.htm";
				}//#if yes
			});
		},
	});
	var panelHeight = 60;
	var topPanel = Ext
			.create(
					'Ext.panel.Panel',
					{
						region : 'north',
						height : panelHeight,
						layout : 'column',
						border : false,
						items : [
								{
									xtype : 'panel',
									columnWidth : 1.0,
									height : panelHeight,
									bodyStyle : "padding-top:0px;background-color:#DEECFD;",
									html : '<img src="${path}/style/cp/img/head.png" height="60" />',
									border : false
								},
								{//title: 'Width = 250px',
									xtype : 'panel',
									autoWidth : true,
									height : panelHeight,
									bodyStyle : "padding-top:30px;background-color:#DEECFD;",
									items : [ button ],
									border : false
								},
								{
									//title: 'Width = 250px',
									xtype : 'panel',
									width : 150,
									height : panelHeight,
									bodyStyle : "padding-top:30px;padding-left:20px;background-color:#DEECFD;",
									items : [ logoutButton ],
									border : false
								} ]
					});
</script>